<!doctype html>
<html lang="en">
	<head>
		<title>JavaScript Patterns</title>
		<meta charset="utf-8">
	</head>
	<body>
		<script>
			/* Title: Minimizing Globals
			 Description: they are declared outside of any function or simply used without being declared
			 */

			myglobal = "hello"; // antipattern
			console.log(myglobal); // "hello"
			console.log(window.myglobal); // "hello"
			console.log(window["myglobal"]); // "hello"
			console.log(this.myglobal); // "hello"

			// References
			// http://net.tutsplus.com/tutorials/javascript-ajax/the-essentials-of-writing-high-quality-javascript/
		</script>
	</body>
</html>